InBox ElasticSearch
Version 6.1.0
Creation date 2021-04-04
Resources
Module to index and perform searches with Elasticsearch.
Prerequisites
Framework
The following versions of the OTRS framework are supported:
- 6.x.x
Modules
The following modules are required:
- InBox Core 6.30.9 ou superior
Operational system
The following operating systems are required:
- [None]
Third Party Software
The following third party software is required:
- [None]
Installation
bin/otrs.Console.pl Admin::Package::Install /path/to/InBox\ ElasticSearch 6.1.0.opm
Configuration
This module can be configured via "System Configuration" in the administrative interface. The following configuration options are available:
Elasticsearch::Active
To enable search by Elasticsearch, enable this setting:
Frontend::ToolBarModule###250-Ticket::ElasticsearchFulltext
To activate the search field as a ToolBar, enable this setting:
Elasticsearch::IngestAttachmentFormat
File formats that are indexed:
Elasticsearch::ExcludedQueues
Tickets in the following queues will not be stored on the Elasticsearch server. To apply this to existing tickets, the ticket migration has to be run via console, after changing this option:
Elasticsearch::IngestMaxFilesize
Maximum file size for the ingest plugin:
Elasticsearch::MaxArticleSearch
Maximal number of results returned by ES per field:
Elasticsearch::TicketStoreFields
Fields stored in the ticket index which are used for other things besides fulltext searches. For the complete functionality all fields are mandatory. If fields are added which can be updated (especially DynamicFields), their respective update event has to be added to the TicketManagement invoker of the Elasticsearch webservice!
Elasticsearch::TicketSearchFields
Fields of the ticket index, used for the ticket fulltext search. Fields are also stored, but are not mandatory for the overall functionality. If fields are added which can be updated (especially DynamicFields), their respective update event has to be added to the TicketManagement invoker of the Elasticsearch webservice!
Elasticsearch::CustomerCompanyStoreFields
Fields stored in the customer company index which are used for other things besides fulltext searches. For the complete functionality all fields are mandatory.
Elasticsearch::CustomerCompanySearchFields
Fields of the customer company index, used for the company fulltext search. Fields are also stored, but are not mandatory for the overall functionality.
Elasticsearch::CustomerUserStoreFields
Fields stored in the customer user index which are used for other things besides fulltext searches. For the complete functionality all fields are mandatory.
Elasticsearch::CustomerUserSearchFields
Fields to be searched in ticket index. Fields are also stored, but are not mandatory for the overall functionality.
Elasticsearch::ArticleIndexCreationSettings
Number of shards (NS) and replicas (NR) for the index:
Elasticsearch::QuickSearchCreatedFormat
Format of Creation date shown for tickets. As an example '%Y-%m-%d %H:%M:%S' would be interpreted as '2020-01-22 18:07:23'. Please refer to http://search.cpan.org/~drolsky/DateTime-1.21/lib/DateTime.pm#strftime_Patterns.
Elasticsearch::QuickSearchShow###Ticket
Objects to search for, how many entries and which attributs to show. Ticket attributes, except queue, have to explicitely be stored via Elasticsearch:
Elasticsearch::QuickSearchShow###CustomerCompany
Objects to search for, how many entries and which attributs to show:
Elasticsearch::QuickSearchShow###CustomerUser
Objects to search for, how many entries and which attributs to show:
Elasticsearch::QuickSearchShow###ConfigItem
Objects to search for, how many entries and which attributs to show. ConfigItem attributes have to explicitly be stored via Elasticsearch:
Elasticsearch::DefaultOperator
Standard operator for ElasticSearch search:
Elasticsearch::AgentElasticFullSearch::Limit
Return limit for AgentElasticFullSearch module:
Swap::NavigationBar::DefaultSearch
Controls if default Action for search has to be replaced by Elasticsearch:
Daemon::SchedulerCronTaskManager::Task###ElasticSearchIndexRebuild
Rebuilds Elasticsearch indices. Can be used for example, if CustomerUsers are authenticated via ldap. Highly inefficient however, as the whole index is rebuild every time.
Elasticsearch::ExcludedCIClasses
ConfigItems of the following classes will not be stored on the Elasticsearch server. To apply this to existing CIs, the CI migration has to be run via console, after changing this option.
Elasticsearch::ExcludedCIDeploymentStates
ConfigItems with the following deployment states will not be stored on the Elasticsearch server. To apply this to existing CIs, the CI migration has to be run via console, after changing this option.
Elasticsearch::ConfigItemStoreFields
Fields stored in the configuration item index which are used for other things besides fulltext searches. For the complete functionality all fields are mandatory.
Elasticsearch::ConfigItemSearchFields
Fields of the configuration item index, used for the fulltext search. Fields are also stored, but are not mandatory for the overall functionality. Inclusion of attachments can be disabled by setting the entry to 0 or deleting it.
Usage
Elasticsearch Web Service
When installing the module the webservice is created, the address of the Elasticsearch server must be configured. Go to Administration->Web Services select the Elasticsearch web service, access the configuration as a requester:
Set the Elasticsearch server endpoint:
If you want to install Elasticsearch on the CentOS 7 server, follow the procedure below.
Install Elasticsearch CentOS 7
The server you’re working on should be updated before you install ElasticSearch 7.x on CentOS 7. Just run the commands below to update it:
sudo yum -y update
Install Java
sudo yum -y install java-1.8.0-openjdk java-1.8.0-openjdk-devel
Download RPM Elasticsearch
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.9.2-x86_64.rpm
Install RPM
rpm -ivh elasticsearch-7.9.2-x86_64.rpm
Enable and Start service Elasticsearch
systemctl enable elasticsearch.service
systemctl start elasticsearch
Indexing of tickets, customers, customer users and configuration items.
To perform indexing, enable this configuration ###Daemon::SchedulerCronTaskManager::Task###ElasticSearchIndexRebuild, or manually execute it with the command below:
bin/otrs.Console.pl Maint::Elasticsearch::Migration